#ifndef FUNWINDOW_H
#define FUNWINDOW_H

#include <QMainWindow>
#include <QProcess>
#include <QTimer>
#include <QtDebug>

//网络请求头文件
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>

//数据解析头文件
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>

namespace Ui {
class funWindow;
}

class funWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit funWindow(QWidget *parent = nullptr);
    ~funWindow();

private slots:
    void auto_play(int exitCode, QProcess::ExitStatus exitStatus);

    void auto_text();

    void read_data(QNetworkReply *reply);

    void on_choiceButton_clicked();

private:
    Ui::funWindow *ui;
    QProcess*process;
    QTimer* textTimer;

    QStringList advTextList;//存放文字广告内容
    QStringList videoList; //存放视频的路径容器

    QNetworkAccessManager* manager;

    qint32 textIndex;
    int videoIndex;
};

#endif // FUNWINDOW_H
